package com.avengers.common.model.base;

import com.avengers.core.model.DbColumn;
import com.avengers.common.model.BookingRecord2024;
import com.jfinal.plugin.activerecord.IBean;

/**
 * @author avengers_jfinal
 * @since 2019-03-11
 */
@SuppressWarnings({"serial", "unchecked"})
public class BaseBookingRecord2024<M extends BaseBookingRecord2024<M>> extends BaseModel<M> implements IBean {
    public static final String TABLE_NAME = "booking_record_2024";

    /**
     * db table columns
     */
    public enum Column implements DbColumn {
        /**
         * id
         **/
        id,
        /**
         * 用户ID 
         **/
        user_id,
        /**
         * 预定域名主键id 
         **/
        booking_domain_id,
        /**
         * 域名 
         **/
        domain,
        /**
         * 分组id 
         **/
        tag_id,
        /**
         * 预定类型 
         **/
        type,
        /**
         * 通道名 
         **/
        channel_name,
        /**
         * 抢注成功通道Id 
         **/
        success_channel_id,
        /**
         * 域名删除时间 
         **/
        delete_time,
        /**
         * 通道分组id 
         **/
        group_id,
        /**
         * 抢注通道，多个逗号分隔 
         **/
        channel,
        /**
         * 状态，WAIT：等待抢注，SUCCESS：抢注成功，FAIL：抢注失败，CANCEL：取消预定 
         **/
        status,
        /**
         * 冻结记录id 
         **/
        freeze_id,
        /**
         * 优惠券Id 
         **/
        coupon_id,
        /**
         * 竞价id 
         **/
        auction_id,
        /**
         * 预订级别, 0：正常预订，1：低价通道 
         **/
        level,
        /**
         * 标识该记录是否来源于自动预订 
         **/
        is_auto_booking,
        /**
         * 创建时间 
         **/
        create_time,
        /**
         * 更新时间 
         **/
        update_time
    }

    @Override
    protected boolean containsColumn(String name) {
        for (Column column : Column.values()) {
            if (column.name().equals(name)) {
                return true;
            }
        }
        return false;
    }

    private static String configName;

    public static BookingRecord2024 init() {
        return new BookingRecord2024();
    }

    @Override
    public String getTableName() {
        return TABLE_NAME;
    }

    protected static void setConfigName(String configName) {
        BaseBookingRecord2024.configName = configName;
    }

    @Override
    protected String getConfigName() {
        return BaseBookingRecord2024.configName;
    }


	public M setId(java.lang.Integer id) {
		set(Column.id.name(), id);
		return (M) this;
	}
	
	public java.lang.Integer getId() {
		return getInt(Column.id.name());
	}

	public M setUserId(java.lang.String userId) {
		set(Column.user_id.name(), userId);
		return (M) this;
	}
	
	public java.lang.String getUserId() {
		return getStr(Column.user_id.name());
	}

	public M setBookingDomainId(java.lang.Long bookingDomainId) {
		set(Column.booking_domain_id.name(), bookingDomainId);
		return (M) this;
	}
	
	public java.lang.Long getBookingDomainId() {
		return getLong(Column.booking_domain_id.name());
	}

	public M setDomain(java.lang.String domain) {
		set(Column.domain.name(), domain);
		return (M) this;
	}
	
	public java.lang.String getDomain() {
		return getStr(Column.domain.name());
	}

	public M setTagId(java.lang.String tagId) {
		set(Column.tag_id.name(), tagId);
		return (M) this;
	}
	
	public java.lang.String getTagId() {
		return getStr(Column.tag_id.name());
	}

	public M setType(java.lang.String type) {
		set(Column.type.name(), type);
		return (M) this;
	}
	
	public java.lang.String getType() {
		return getStr(Column.type.name());
	}

	public M setChannelName(java.lang.String channelName) {
		set(Column.channel_name.name(), channelName);
		return (M) this;
	}
	
	public java.lang.String getChannelName() {
		return getStr(Column.channel_name.name());
	}

	public M setSuccessChannelId(java.lang.Integer successChannelId) {
		set(Column.success_channel_id.name(), successChannelId);
		return (M) this;
	}
	
	public java.lang.Integer getSuccessChannelId() {
		return getInt(Column.success_channel_id.name());
	}

	public M setDeleteTime(java.util.Date deleteTime) {
		set(Column.delete_time.name(), deleteTime);
		return (M) this;
	}
	
	public java.util.Date getDeleteTime() {
		return getDate(Column.delete_time.name());
	}

	public M setGroupId(java.lang.Integer groupId) {
		set(Column.group_id.name(), groupId);
		return (M) this;
	}
	
	public java.lang.Integer getGroupId() {
		return getInt(Column.group_id.name());
	}

	public M setChannel(java.lang.String channel) {
		set(Column.channel.name(), channel);
		return (M) this;
	}
	
	public java.lang.String getChannel() {
		return getStr(Column.channel.name());
	}

	public M setStatus(java.lang.String status) {
		set(Column.status.name(), status);
		return (M) this;
	}
	
	public java.lang.String getStatus() {
		return getStr(Column.status.name());
	}

	public M setFreezeId(java.lang.String freezeId) {
		set(Column.freeze_id.name(), freezeId);
		return (M) this;
	}
	
	public java.lang.String getFreezeId() {
		return getStr(Column.freeze_id.name());
	}

	public M setCouponId(java.lang.Integer couponId) {
		set(Column.coupon_id.name(), couponId);
		return (M) this;
	}
	
	public java.lang.Integer getCouponId() {
		return getInt(Column.coupon_id.name());
	}

	public M setAuctionId(java.lang.Integer auctionId) {
		set(Column.auction_id.name(), auctionId);
		return (M) this;
	}
	
	public java.lang.Integer getAuctionId() {
		return getInt(Column.auction_id.name());
	}

	public M setLevel(java.lang.Integer level) {
		set(Column.level.name(), level);
		return (M) this;
	}
	
	public java.lang.Integer getLevel() {
		return getInt(Column.level.name());
	}

	public M setAutoBooking(java.lang.Boolean isAutoBooking) {
		set(Column.is_auto_booking.name(), isAutoBooking);
		return (M) this;
	}
	
	public java.lang.Boolean getAutoBooking() {
		return get(Column.is_auto_booking.name());
	}

	public M setCreateTime(java.util.Date createTime) {
		set(Column.create_time.name(), createTime);
		return (M) this;
	}
	
	public java.util.Date getCreateTime() {
		return getDate(Column.create_time.name());
	}

	public M setUpdateTime(java.util.Date updateTime) {
		set(Column.update_time.name(), updateTime);
		return (M) this;
	}
	
	public java.util.Date getUpdateTime() {
		return getDate(Column.update_time.name());
	}
}
